package com.iris.live.services.data.models;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * Created by HangLiu on 2017/2/20.
 */
@Entity
@Table(name = "t_ins_buyinfo", schema = "live", catalog = "")
public class TInsBuyinfoModel {
    private Integer id;
    private Integer pdId;
    private String insname;
    private String parameter;
    private BigDecimal sdew;
    private String addParameter;
    private BigDecimal originalCost;
    private BigDecimal discountPrice;
    private String updateid;
    private Timestamp updatetime;

    @Id
    @Column(name = "ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "pdID")
    public Integer getPdId() {
        return pdId;
    }

    public void setPdId(Integer pdId) {
        this.pdId = pdId;
    }

    @Basic
    @Column(name = "insname")
    public String getInsname() {
        return insname;
    }

    public void setInsname(String insname) {
        this.insname = insname;
    }

    @Basic
    @Column(name = "parameter")
    public String getParameter() {
        return parameter;
    }

    public void setParameter(String parameter) {
        this.parameter = parameter;
    }

    @Basic
    @Column(name = "SDEW")
    public BigDecimal getSdew() {
        return sdew;
    }

    public void setSdew(BigDecimal sdew) {
        this.sdew = sdew;
    }

    @Basic
    @Column(name = "add_parameter")
    public String getAddParameter() {
        return addParameter;
    }

    public void setAddParameter(String addParameter) {
        this.addParameter = addParameter;
    }

    @Basic
    @Column(name = "original_cost")
    public BigDecimal getOriginalCost() {
        return originalCost;
    }

    public void setOriginalCost(BigDecimal originalCost) {
        this.originalCost = originalCost;
    }

    @Basic
    @Column(name = "discount_price")
    public BigDecimal getDiscountPrice() {
        return discountPrice;
    }

    public void setDiscountPrice(BigDecimal discountPrice) {
        this.discountPrice = discountPrice;
    }

    @Basic
    @Column(name = "updateid")
    public String getUpdateid() {
        return updateid;
    }

    public void setUpdateid(String updateid) {
        this.updateid = updateid;
    }

    @Basic
    @Column(name = "updatetime")
    public Timestamp getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Timestamp updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TInsBuyinfoModel that = (TInsBuyinfoModel) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (pdId != null ? !pdId.equals(that.pdId) : that.pdId != null) return false;
        if (insname != null ? !insname.equals(that.insname) : that.insname != null) return false;
        if (parameter != null ? !parameter.equals(that.parameter) : that.parameter != null) return false;
        if (sdew != null ? !sdew.equals(that.sdew) : that.sdew != null) return false;
        if (addParameter != null ? !addParameter.equals(that.addParameter) : that.addParameter != null) return false;
        if (originalCost != null ? !originalCost.equals(that.originalCost) : that.originalCost != null) return false;
        if (discountPrice != null ? !discountPrice.equals(that.discountPrice) : that.discountPrice != null)
            return false;
        if (updateid != null ? !updateid.equals(that.updateid) : that.updateid != null) return false;
        if (updatetime != null ? !updatetime.equals(that.updatetime) : that.updatetime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (pdId != null ? pdId.hashCode() : 0);
        result = 31 * result + (insname != null ? insname.hashCode() : 0);
        result = 31 * result + (parameter != null ? parameter.hashCode() : 0);
        result = 31 * result + (sdew != null ? sdew.hashCode() : 0);
        result = 31 * result + (addParameter != null ? addParameter.hashCode() : 0);
        result = 31 * result + (originalCost != null ? originalCost.hashCode() : 0);
        result = 31 * result + (discountPrice != null ? discountPrice.hashCode() : 0);
        result = 31 * result + (updateid != null ? updateid.hashCode() : 0);
        result = 31 * result + (updatetime != null ? updatetime.hashCode() : 0);
        return result;
    }
}
